<div class="pages">
    <div class="pages-pr">
        {% if page <=1 %}
        <span>没有上页了o(╥﹏╥)o</span>
        {% else %}
        <a href="?page={{ page-1 }}">上一页</a>
        {% endif %}
    </div>
    <div class="pages-center">

        {% if pages<=1 %}
        <a href="javascript:;" class="active">{{ page }}</a>
        {% else %}
        {% if page <= 1 %}
        <a href="javascript:;" class="active">{{ page }}</a>
        <a href="?page={{ page+1 }}">{{ page+1 }}</a>
        {% else %}
        <a href="?page={{ page-1 }}">{{ page-1 }}</a>
        <a href="javascript:;" class="active">{{ page }}</a>
        {% if !(page >= pages) %}
        <a href="?page={{ page+1 }}">{{ page+1 }}</a>
        {% endif %}
        {% endif %}
        {% endif %}

        <span>...</span>
        (共{{ pages }}页 / 总{{ count }}条 / 每页{{ num }}条 / 当前第{{ page }}页)
    </div>
    <div class="pages-ne">
        {% if page >=  pages  %}
        <span>没有下页了o(╥﹏╥)o</span>
        {% else %}
        <a href="?page={{ page+1 }}">下一页</a>
        {% endif %}
    </div>
</div>